﻿using System.Drawing;

using NUnit.Framework;

using Microsoft.WowAddonStudio.FrameXml.Backdrop;

namespace Microsoft.WowAddonStudio.FrameXml.Tests.Backdrop
{
    [TestFixture]
    public class BlpImageTest
    {
        private const string blpImagePath = @"Backdrop\Data\Tirion.blp";
        private const string expectedImagePath = @"Backdrop\Data\Tirion.png";

        [Test]
        public void BlpLoadFromTest()
        {
            var blpImage = BlpImage.FromFile(blpImagePath);
            var expectedImage = Image.FromFile(expectedImagePath);

            Assert.IsNotNull(blpImage, "LoadFrom returned null.");
            Assert.AreEqual(expectedImage.Width, blpImage.Width, "Image returned has unexpected width." );
            Assert.AreEqual(expectedImage.Height, blpImage.Height, "Image returned has unexpected height.");
        }
    }
}
